UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '4a4q5TJz4YA6qlzn6wuVgmeYFGWS0+rMkBvfi6HHNcQ=' 
WHERE 
  key_id = '44d9a4ab95f7334262a870d0acd599bf1e05f3e12df55068edd2a0096e5262a5' 
  AND (
    token = '4a4q5TJz4YA6qlzn6wuVgmeYFGWS0+rMkBvfi6HHNcQ=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00048