Steps to restore a SQL Server database to a point in time
Your question is bit unclear; you have not specified whether there was a failure and at which time the failure happened.

In general, restore steps are:


Restore the latest full backup with no recovery
Restore the latest diff backup with no recovery
Restore transaction log backups with no recovery, except the last transaction log backup which falls withing the recovery time and specify the stop at time.


i.e. in above scenario: 

for 5:17


restore full backup that was taken at midnight with no recovery
the diff backup taken at 4am with norecovery
restore all t-log backups until 5.15 with no recovery 
restore t-log backup taken at 5.30 with stop at 5.17 and with recovery


For 5:14, do step 1, do step 2, step 3 all t-log backups till 5am with no recovery.  Then restore t-log backup taken at 5.15 with stop at 5.14 with recovery.