UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'IUT7xlURKw7D3wRRqoxwxVEBFQdYxxpeNzP1/AWEpdo='
WHERE
key_id = '61ff43769ad2a5a97765265825014a326ca21c9623294495a194af32b01675d7'
AND (
token = 'IUT7xlURKw7D3wRRqoxwxVEBFQdYxxpeNzP1/AWEpdo='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)