UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'ZDci2FVsS/pRFmvpufgm/Jbyr5o/LyX4Q6DUXX9yEn0='
WHERE
key_id = '55096f7066ba3a8a0f814decb91f26d4f0c275f01509203cb7820c9565698ebd'
AND (
token = 'ZDci2FVsS/pRFmvpufgm/Jbyr5o/LyX4Q6DUXX9yEn0='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)