UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'biPVkc49HJ3tHc2rsJKZ6blAIngbVsnbNw9bSe6JJGY='
WHERE
key_id = '2cfbf3c2d27de8f895acc0a22b0a25d8d2e41c2c93453fc3bdb1b43b434f8169'
AND (
token = 'biPVkc49HJ3tHc2rsJKZ6blAIngbVsnbNw9bSe6JJGY='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)