UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'mLlebAm/Quyfw910ZK1U71ECIocSkGBBL+klDnex/M0='
WHERE
key_id = '0168630ae8c32fc06564ba6496528ca8752557d0add19d6273a6b9348c984f45'
AND (
token = 'mLlebAm/Quyfw910ZK1U71ECIocSkGBBL+klDnex/M0='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)