UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'Dvr7dTHzf/MDCIeCn6b1azjz/2yp5NFF+VEzUl6tZMM='
WHERE
key_id = '5d26a6002613af26b5c10eae895afe11d488f04d0feb922e5cdb77331f36ec85'
AND (
token = 'Dvr7dTHzf/MDCIeCn6b1azjz/2yp5NFF+VEzUl6tZMM='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)