UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'e5ZY7EuVhoWHv3xKVIxKJWTJHqtq5/KzAVTzxz8iWiY=' 
WHERE 
  key_id = 'a4fd4628e09713f535c65f42a6d8f9fd095aeef02e65c44f1315e93f39bb8a3b' 
  AND (
    token = 'e5ZY7EuVhoWHv3xKVIxKJWTJHqtq5/KzAVTzxz8iWiY=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00053