UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'WcTbBen3FNNVEv0cQ6RUSMKxkH5umsd2ZB+RBKSKY6Y='
WHERE
key_id = '146cfc48de43ceb8dfca0ab1c8ac9bf6eab30e4b36eba190d38797fea8d6181f'
AND (
token = 'WcTbBen3FNNVEv0cQ6RUSMKxkH5umsd2ZB+RBKSKY6Y='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)