UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'zcc8x3aFBnt+1nNFR7HwecdapjiIQb4oXsyO/Cclag4='
WHERE
key_id = '7ce3d4368bd39a76c3d6a4d307888e178f46987303f39a8f97c36f29b26e3c86'
AND (
token = 'zcc8x3aFBnt+1nNFR7HwecdapjiIQb4oXsyO/Cclag4='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)