UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '4F5Ud7T/fEpSg2pbkOJwKhP3YfE3BwjV1YaJ1+vmcSs=' 
WHERE 
  key_id = '7823eaab9ea934e6e51c8e5b947e2d371a3bc8c68ce1ffc633774696a1bca41d' 
  AND (
    token = '4F5Ud7T/fEpSg2pbkOJwKhP3YfE3BwjV1YaJ1+vmcSs=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00104