UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'RIEne9uJ6EHaFw1ttCz95jTB9QK/cA0u7lXxfL/++sY=' 
WHERE 
  key_id = '0ab3d02b5a79d8ec676c60e14eafb1cc765e28150e918fb2ebfda8b486035c7e' 
  AND (
    token = 'RIEne9uJ6EHaFw1ttCz95jTB9QK/cA0u7lXxfL/++sY=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00042