UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'MbvpXd2rZdHIsmRY5VHi1GWIlYPXANGdsaKXsQubKQo='
WHERE
key_id = '0b13ac12a19fbca4bd3eab29c671eeabb3d113b0886bcaef1af09ec5eff18e7f'
AND (
token = 'MbvpXd2rZdHIsmRY5VHi1GWIlYPXANGdsaKXsQubKQo='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)