UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'vh6o+u+NvzfDhxTb/5es9vTI14dAVkcp3NQvtOp0UH8='
WHERE
key_id = '443deee7783320a470555907546201df778725a52f068dea11c2faffce7d0fa7'
AND (
token = 'vh6o+u+NvzfDhxTb/5es9vTI14dAVkcp3NQvtOp0UH8='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)