UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'GLwJKE27/YwkQnjsRobwtBWQmd73Ex92fE8etl375Ys='
WHERE
key_id = 'ac69b202acabb3dd57cbd40ee6858fe2d7ea81a5e8145eda7d3adf178b0d6f4f'
AND (
token = 'GLwJKE27/YwkQnjsRobwtBWQmd73Ex92fE8etl375Ys='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)