UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'xftPaKlf2E90M6p+SalsrDYjLu5s3AVMZNOpfWukaSU=' 
WHERE 
  key_id = '236fd836566c63d3deec497780854a151ae7e82a8346570770be325e70970eee' 
  AND (
    token = 'xftPaKlf2E90M6p+SalsrDYjLu5s3AVMZNOpfWukaSU=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00033