UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'ybs7HUOjItsrfPGojWuGPzbKgt+a/iBNeRy4BQlIHws=' 
WHERE 
  key_id = 'b95d9b2e8729ffd2c43a998bcc2bb76aaf7aeb3a946b5d6088d9b2a2a8d01f68' 
  AND (
    token = 'ybs7HUOjItsrfPGojWuGPzbKgt+a/iBNeRy4BQlIHws=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00034