UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'CABsswcxg4EpndHE8LySWWNAMImAbaaoN+pqfymWzXI=' 
WHERE 
  key_id = '6b01b7f7e6fbf99f5c86fa53d4760d0c660ae6473df6688930b1b77646cf03ba' 
  AND (
    token = 'CABsswcxg4EpndHE8LySWWNAMImAbaaoN+pqfymWzXI=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00033