UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'DNOlSGX0ahs/JIP6SQcEzm9Oq12ox+JD90cLvBBh2Lk=' 
WHERE 
  key_id = 'e2de08ef8d0e4aa1c60f3e20364706e23668f615cf2a0f61fc05a60df553c0f6' 
  AND (
    token = 'DNOlSGX0ahs/JIP6SQcEzm9Oq12ox+JD90cLvBBh2Lk=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00034