UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '8Y/zml/COYNniTCtLaRBjHg8rxbKJ05gqS5Gc9Xs/Ik=' 
WHERE 
  key_id = 'da14cfa3479d7baba8d90314d5233482d9ec20fa6d0b2a707a49ea74f2d47ad3' 
  AND (
    token = '8Y/zml/COYNniTCtLaRBjHg8rxbKJ05gqS5Gc9Xs/Ik=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00047