UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '98idL5idm9mpP/HGS6FY/k7CvLz+aA6/L5MBB+3SktA='
WHERE
key_id = 'bbc681b2777d161dbd296f3be0d7e1d6c4fd76c27a1ff41f0b59ba93815dac95'
AND (
token = '98idL5idm9mpP/HGS6FY/k7CvLz+aA6/L5MBB+3SktA='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)