UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '03IwtLY+L5faF13h3MXTIJFbk9h4F6rt/8mlS018QgA=' 
WHERE 
  key_id = '376b03c652ca1bb0754a606579c508d5ed10571cf91d98e3edd4fa7d719ae2a4' 
  AND (
    token = '03IwtLY+L5faF13h3MXTIJFbk9h4F6rt/8mlS018QgA=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00039