UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'QZt3vZ5A2l1YQerGscU7R7PuP6Kd6TNbhB5BtzSRmx8='
WHERE
key_id = '93ebcf0c2efd8598fc166baba504664af1ac82e1ac339d129a58200199828e63'
AND (
token = 'QZt3vZ5A2l1YQerGscU7R7PuP6Kd6TNbhB5BtzSRmx8='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)