UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'Mdu2XUc5wBw71b4TBozY3X3y2IMvVQk2UWRPemaHPww='
WHERE
key_id = '4b26035a9ea96b3eb55b2d3d2fcdbe1ff474169e1ea82bf46784a44e56f2147c'
AND (
token = 'Mdu2XUc5wBw71b4TBozY3X3y2IMvVQk2UWRPemaHPww='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)