UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'ps4RJMjz6U6hP3TvshtKu4yvWSEaldM0HllFoAvekqE=' 
WHERE 
  key_id = '68d6f752a4772b9de5c3549537ba863bbda3fed4d9bc4166d40850330efdb20f' 
  AND (
    token = 'ps4RJMjz6U6hP3TvshtKu4yvWSEaldM0HllFoAvekqE=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00081