UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'E1KUXrjFaCwGES9tQ+rRnHPDeY0R2WRCa2qJwJjvQD4=' 
WHERE 
  key_id = '235409208166b761b00ee2c9a47d339c501c678e4fcad48132ba5340374ccd3c' 
  AND (
    token = 'E1KUXrjFaCwGES9tQ+rRnHPDeY0R2WRCa2qJwJjvQD4=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00031