UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'lz1K3GqPYZKd1/6Rs9MU0Ywgd1iBH28lxd+z3aSWm/M='
WHERE
key_id = '3a01fc36da16207cd41e39a3570586b01cd06ce6390216280d45b6c1632953ec'
AND (
token = 'lz1K3GqPYZKd1/6Rs9MU0Ywgd1iBH28lxd+z3aSWm/M='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)