UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'FKNV2FF6i/p1pTbFYt0Iaf8KDBnivVfSqOdghLmib7c='
WHERE
key_id = '44411dc7bb0ec3b39b673e23f00a62be5feb41f492b58c265e20d566b770fa0d'
AND (
token = 'FKNV2FF6i/p1pTbFYt0Iaf8KDBnivVfSqOdghLmib7c='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)