UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'xACYieOwLn1Cw/DiJv6gE33mgNVTrBykj825VMHW1kI='
WHERE
key_id = '0f060660cb518b010c1c06659f867c557a9664c151f99fe791da8fa25a0dab01'
AND (
token = 'xACYieOwLn1Cw/DiJv6gE33mgNVTrBykj825VMHW1kI='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)