UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'FiangZMb/IJ1F9j437SP2rDbHJNIDIToV0COHLNwZps='
WHERE
key_id = '1a45c6fa21c318c1f67fb50a50f31786c44b8eef9b6a4ab1540caa05fb84c700'
AND (
token = 'FiangZMb/IJ1F9j437SP2rDbHJNIDIToV0COHLNwZps='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)