UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'WXB4fHUd6p20ZT/fHU7yAqa+C3cL0K02ZypwUZ2pJu0='
WHERE
key_id = '4b2acbaf208956211d30e0d0ca38fc5449e7a5fc40000922ce740020e481b1c4'
AND (
token = 'WXB4fHUd6p20ZT/fHU7yAqa+C3cL0K02ZypwUZ2pJu0='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)