UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'WtpySVz3qPlP/I43Yd6+oVr0dAdj1xjhMiM7ucNltfk='
WHERE
key_id = '027ce9a9c4fa07b0d1fbf00b8de94ec4428ee498c34cc7ac2b9cc3014b9e21a3'
AND (
token = 'WtpySVz3qPlP/I43Yd6+oVr0dAdj1xjhMiM7ucNltfk='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)