UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'zxx6EgMuth/FQvwRmvNRtIRcx/CjQuYcGk/rYQM2PSk=' 
WHERE 
  key_id = '0bbb234be84fdded4ebc6d3938db2614c78fb9653687c00ba9de2699c82c798f' 
  AND (
    token = 'zxx6EgMuth/FQvwRmvNRtIRcx/CjQuYcGk/rYQM2PSk=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00042