UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'owMkSDXqR36DLAp+T/AtBqKqcRXWgjIIh98EUb9EXJU=' 
WHERE 
  key_id = '69a0d63d1a0c99342d3ad14c627e8ba9ae5517fb801094481a895d09ded118c8' 
  AND (
    token = 'owMkSDXqR36DLAp+T/AtBqKqcRXWgjIIh98EUb9EXJU=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00019