UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'blY190+h2/GFsA+yFhu4rHzisheOjfbDd3N/ooSNraI='
WHERE
key_id = '7ba285e5ff3a7df5c9846047b1acf1af01deb335e5c471af209bd6140a9e406f'
AND (
token = 'blY190+h2/GFsA+yFhu4rHzisheOjfbDd3N/ooSNraI='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)