UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '36rR06e7FAn+VmBGg0XI3iXO1V2TK/moUrzuVbL5u4c=' 
WHERE 
  key_id = '7c7926cb2aaf721e400da097b46ec05a9c103f2140228bdbe3b305aad69f7e59' 
  AND (
    token = '36rR06e7FAn+VmBGg0XI3iXO1V2TK/moUrzuVbL5u4c=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00046