UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'PuNzu3xVu8P08iT8xcw9IhLa4A7DUszeS/0xNE/5k0I='
WHERE
key_id = '28225c075b2ca575d66ad8d73be42e3936441b4bb3c61175cb9a13147edad158'
AND (
token = 'PuNzu3xVu8P08iT8xcw9IhLa4A7DUszeS/0xNE/5k0I='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)