UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '5PxezJrLmo/fwDmaVm7nEywm4lMXNiP4G+Vhr6mldEI='
WHERE
key_id = '74405a7a366a778c8d67997f82ff05d60fa46b96e79e3043b5311a0c5b1faa6c'
AND (
token = '5PxezJrLmo/fwDmaVm7nEywm4lMXNiP4G+Vhr6mldEI='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)