UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'iqE9BKz0lKPa60WhiMeDTPZ0FPozUbWOr119mDKQ/vQ='
WHERE
key_id = '36744bc34d430a91aeff756c01b5270b3836601306a40a812a083eb74157506c'
AND (
token = 'iqE9BKz0lKPa60WhiMeDTPZ0FPozUbWOr119mDKQ/vQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)