UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'kGHHdyUCvMZsb/jSMDZG7/D3YBuMKKJKvTGv0dnGlxU='
WHERE
key_id = '1797eb3b4d35ef7d2b5de78c04ad7a2f32d12c94e266798c99099b13fb1aee4f'
AND (
token = 'kGHHdyUCvMZsb/jSMDZG7/D3YBuMKKJKvTGv0dnGlxU='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)