UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'j2ptG3hYpPxjXfNwCsd93oKN7jkckRyTkSBKZqQWBtc=' 
WHERE 
  key_id = '25ffbf52e2c1ae41a3ed7cc070f8f30c19cbd57820582544f47e5baa0a0a118b' 
  AND (
    token = 'j2ptG3hYpPxjXfNwCsd93oKN7jkckRyTkSBKZqQWBtc=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00021