UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'Uv1uoyLLHdR+Xf+af7wozmnF2ErmRtZqkFmZ/h3dsvk=' 
WHERE 
  key_id = 'afa5a98287cff3b257380a1bb41da298d7c28a8d0cb4c017cf7d2aaabe9f48c1' 
  AND (
    token = 'Uv1uoyLLHdR+Xf+af7wozmnF2ErmRtZqkFmZ/h3dsvk=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00031