UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '60jpNQ+++243kSCXKrj5dg15tqLT02IGYnIdKCulmek=' 
WHERE 
  key_id = '054ef4354fd960158d1f30177cf1223fa2a623b9b9891e9f0e01cbf2a734cc77' 
  AND (
    token = '60jpNQ+++243kSCXKrj5dg15tqLT02IGYnIdKCulmek=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00027