UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'TVYwmtoHhf9/nWIHo/3M4WebhkOxXaPOSXEdbZTf4/o='
WHERE
key_id = '69d3933ee32cd20529654cb243b02988f64e90a19806842d82a950c04c7ac79c'
AND (
token = 'TVYwmtoHhf9/nWIHo/3M4WebhkOxXaPOSXEdbZTf4/o='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)