UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'UC/wTb+oxuAzSCkXIOpyXvrqdihSnpCDLPkSnyHzBGU='
WHERE
key_id = '68a08c1f841fcb8616e4805f0857b2358ca736d745d10d318900c3d8b0482349'
AND (
token = 'UC/wTb+oxuAzSCkXIOpyXvrqdihSnpCDLPkSnyHzBGU='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)